package cn.zl.ymcc.controller;

import cn.zl.ymcc.result.Result;
import cn.zl.ymcc.service.RefryCodeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/verifycode")
public class RefryCodeController {
    @Autowired
    private RefryCodeService refryCodeService;
    @GetMapping("/sendSmsCode/{phone}")
    public Result sendCode(@PathVariable("phone") String phone){
      refryCodeService.sendCode(phone);
        return Result.success();
    }

}
